#include <iostream>
#include <math.h>

using std::cout;
using std::endl;

class Point{
public:
    Point(int x,int y)
    :_x(x)
     ,_y(y)
    {

    }

    friend 
        float distance(const Point & lhs,const Point & rhs);

private:
        int _x;
        int _y;
};

float distance(const Point & lhs,const Point & rhs){
    return sqrt(pow(lhs._x-rhs._x,2)+pow(lhs._y-rhs._y,2));
}

void test(){
    Point pt1(1,2),pt2(3,4);

    cout << distance(pt1,pt2) << endl;
}

int main()
{
    test();
    return 0;
}

